<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
</head>
<body>
<script type="text/javascript">
    async function main() {
    //    1.如果返回值是一个非Promise对象，则返回fulfilled Promise
    //     return 1;
    //    2.如果返回值是一个Promise对象，则返回跟返回值状态相同的Promise
    //     return new Promise((resolve, reject) => {
    //         // resolve("OK");
    //         reject("Error");
    //     });
    //    3.如果抛出异常，则返回rejected Promise
        throw "Error";
    }

    let res = main();
    console.log(res);
</script>
</body>
</html>